home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
076-100
/
disk_077
/
samples
/
qfunc.d
< prev
next >
Wrap
Text File
|
1992-05-06
|
366b
|
24 lines
bool PRINT = false;
int SIZE = 1000,
TIMES = 100;
[SIZE + 1] int A;
proc main()void:
int i, count;
writeln("Starting..");
for count from 1 upto TIMES do
A[1] := 1;
A[2] := 2;
for i from 3 upto 1000 do
A[i] := A[i - A[i - 1]] + A[i - A[i - 2]];
if PRINT then
writeln(i, ' ', A[i]);
fi;
od;
od;
writeln("Done.");
corp;